package com.veeder.datacollection.alarm;


public class AlarmId {
	private int deviceId;

	private String category;
	
	private String code;
	

	public AlarmId(int deviceId, String category, String code) {
		this.deviceId = deviceId;
		this.category = category;
		this.code = code;
	}
	public int getDeviceId() {
		return deviceId;
	}
	public void setDeviceId(int deviceId) {
		this.deviceId = deviceId;
	}
	public String getCategory() {
		return category;
	}
	public void setCategory(String category) {
		this.category = category;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((category == null) ? 0 : category.hashCode());
		result = prime * result + ((code == null) ? 0 : code.hashCode());
		result = prime * result + deviceId;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		AlarmId other = (AlarmId) obj;
		if (category == null) {
			if (other.category != null)
				return false;
		} else if (!category.equals(other.category))
			return false;
		if (code == null) {
			if (other.code != null)
				return false;
		} else if (!code.equals(other.code))
			return false;
		if (deviceId != other.deviceId)
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "AlarmId [deviceId=" + deviceId + ", category=" + category + ", code=" + code + "]";
	}
	
}
